package com.tdxy.service.impl;

import com.tdxy.dao.UserDao;
import com.tdxy.entity.User;
import com.tdxy.service.UserService;

public class UserServiceImpl implements UserService {

    private UserDao dao ;

    public UserServiceImpl(UserDao dao) {
        this.dao = dao ;
    }

    @Override
    public void save(User user) {
        int i = dao.save(user);

        if( i == 1 ){
            // 实现添加成功的业务逻辑
        }else{
            // 实现添加失败的业务逻辑
        }
    }
}
